package com.example.myapplication.utils;

import android.util.Log;

/**
 * log日志管理工具
 */
public class LogUtils {
    private static boolean ISLogCat = true;
    public static void i(String tag, String text){
        if(ISLogCat){
            Log.i(tag,text);
        }
    }

    public static void e(String tag, String text){
        if(ISLogCat){
            Log.e(tag,text);
        }
    }

    public static boolean ISLogCat() {
        return ISLogCat;
    }

    public static void setISLogCat(boolean ISLogCat) {
        LogUtils.ISLogCat = ISLogCat;
    }

    private static LogUtils logUtils;
    public static LogUtils init(){
        if(logUtils==null){
            logUtils = new LogUtils();
        }
        return logUtils;
    }

    public static abstract class LogExCallback {
        public abstract void onFailed();
        public abstract void onSuccess();
    }

}
